﻿
namespace Indeco.G24.Windows.Forms
{
	/// <summary>
	/// This is the abstract edit form for the <see cref="Entities.SanPham"/> entity.
	/// </summary>
	/// <remarks>This class is overwritten by .netTiers at each generation.</remarks>
	[System.ComponentModel.DesignerCategoryAttribute("code")]
	public abstract class SanPhamEditControlBase : System.Windows.Forms.UserControl
	{
		#region Fields
		
		//private System.Windows.Forms.TableLayoutPanel uxTableLayoutPanel;
		/// <summary>
		/// The ErrorProvider for the Entity;
		/// </summary>
		protected System.Windows.Forms.ErrorProvider uxErrorProvider;
		
		/// <summary>
		/// The BindingSource for the entity.
		///</summary>
		protected System.Windows.Forms.BindingSource uxBindingSource;
						
		
		/// <summary>
		/// TextBox for the IDSanPham property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxIDSanPham;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the IDSanPham property.
		/// </summary>
		protected System.Windows.Forms.Label uxIDSanPhamLabel;
		
		/// <summary>
		/// ComboBox for the IDSanPhamDanhMuc property.
		/// </summary>
		protected System.Windows.Forms.ComboBox uxIDSanPhamDanhMuc;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the IDSanPhamDanhMuc property.
		/// </summary>
		protected System.Windows.Forms.Label uxIDSanPhamDanhMucLabel;
		
		/// <summary>
		/// ComboBox for the NhaCungCap property.
		/// </summary>
		protected System.Windows.Forms.ComboBox uxNhaCungCap;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the NhaCungCap property.
		/// </summary>
		protected System.Windows.Forms.Label uxNhaCungCapLabel;
		
		/// <summary>
		/// TextBox for the Ten property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxTen;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the Ten property.
		/// </summary>
		protected System.Windows.Forms.Label uxTenLabel;
		
		/// <summary>
		/// TextBox for the MoTa property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxMoTa;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the MoTa property.
		/// </summary>
		protected System.Windows.Forms.Label uxMoTaLabel;
		
		/// <summary>
		/// TextBox for the NhaSanXuat property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxNhaSanXuat;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the NhaSanXuat property.
		/// </summary>
		protected System.Windows.Forms.Label uxNhaSanXuatLabel;
		
		/// <summary>
		/// TextBox for the DonViTinh property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxDonViTinh;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the DonViTinh property.
		/// </summary>
		protected System.Windows.Forms.Label uxDonViTinhLabel;
		
		/// <summary>
		/// TextBox for the HinhMinhHoa property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxHinhMinhHoa;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the HinhMinhHoa property.
		/// </summary>
		protected System.Windows.Forms.Label uxHinhMinhHoaLabel;
		
		/// <summary>
		/// CheckBox for the TrangThai property.
		/// </summary>
		protected System.Windows.Forms.CheckBox uxTrangThai;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the TrangThai property.
		/// </summary>
		protected System.Windows.Forms.Label uxTrangThaiLabel;
		
		/// <summary>
		/// TextBox for the ViTri property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxViTri;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the ViTri property.
		/// </summary>
		protected System.Windows.Forms.Label uxViTriLabel;
		
		/// <summary>
		/// TextBox for the SoLanXem property. 
		/// </summary>
		protected System.Windows.Forms.TextBox uxSoLanXem;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the SoLanXem property.
		/// </summary>
		protected System.Windows.Forms.Label uxSoLanXemLabel;
		
		/// <summary>
		/// DataTimePicker for the ThoiDiemChinhSua property.
		/// </summary>
		protected System.Windows.Forms.DateTimePicker uxThoiDiemChinhSua;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the ThoiDiemChinhSua property.
		/// </summary>
		protected System.Windows.Forms.Label uxThoiDiemChinhSuaLabel;
		
		/// <summary>
		/// DataTimePicker for the ThoiDiemCapNhat property.
		/// </summary>
		protected System.Windows.Forms.DateTimePicker uxThoiDiemCapNhat;
		
		/// <summary>
		/// The <see cref="System.Windows.Forms.Label"/> associated with the ThoiDiemCapNhat property.
		/// </summary>
		protected System.Windows.Forms.Label uxThoiDiemCapNhatLabel;
		#endregion
		
		#region Main entity
		private Entities.SanPham _SanPham;
		/// <summary>
		/// Gets or sets the <see cref="Entities.SanPham"/> entity to edit with this form.
		/// </summary>
		/// <value>The <see cref="Entities.SanPham"/> instance.</value>
		public Entities.SanPham SanPham
		{
			get {return this._SanPham;}
			set
			{
				this._SanPham = value;
				if (value != null) 
				{
					this.uxBindingSource.DataSource = value;
					BindControls();
				}			
				
			}
		}
		#endregion
		
		/// <summary>
		/// Binds the controls.
		/// </summary>
		private void BindControls()
		{
			this.uxIDSanPham.DataBindings.Clear();
			this.uxIDSanPham.DataBindings.Add("Text", this.uxBindingSource, "IDSanPham", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxIDSanPhamDanhMuc.DataBindings.Clear();
			this.uxIDSanPhamDanhMuc.DataBindings.Add("SelectedValue", this.uxBindingSource, "IDSanPhamDanhMuc", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxNhaCungCap.DataBindings.Clear();
			this.uxNhaCungCap.DataBindings.Add("SelectedValue", this.uxBindingSource, "NhaCungCap", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxTen.DataBindings.Clear();
			this.uxTen.DataBindings.Add("Text", this.uxBindingSource, "Ten", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxMoTa.DataBindings.Clear();
			this.uxMoTa.DataBindings.Add("Text", this.uxBindingSource, "MoTa", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxNhaSanXuat.DataBindings.Clear();
			this.uxNhaSanXuat.DataBindings.Add("Text", this.uxBindingSource, "NhaSanXuat", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxDonViTinh.DataBindings.Clear();
			this.uxDonViTinh.DataBindings.Add("Text", this.uxBindingSource, "DonViTinh", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxHinhMinhHoa.DataBindings.Clear();
			this.uxHinhMinhHoa.DataBindings.Add("Text", this.uxBindingSource, "HinhMinhHoa", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxTrangThai.DataBindings.Clear();
			this.uxTrangThai.DataBindings.Add("Checked", this.uxBindingSource, "TrangThai", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxViTri.DataBindings.Clear();
			this.uxViTri.DataBindings.Add("Text", this.uxBindingSource, "ViTri", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxSoLanXem.DataBindings.Clear();
			this.uxSoLanXem.DataBindings.Add("Text", this.uxBindingSource, "SoLanXem", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxThoiDiemChinhSua.DataBindings.Clear();
			this.uxThoiDiemChinhSua.DataBindings.Add("Value", this.uxBindingSource, "ThoiDiemChinhSua", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
			this.uxThoiDiemCapNhat.DataBindings.Clear();
			this.uxThoiDiemCapNhat.DataBindings.Add("Value", this.uxBindingSource, "ThoiDiemCapNhat", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged);
		}					
		
		#region Constructor
		
		/// <summary>
		/// Initializes a new instance of the <see cref="SanPhamEditControlBase"/> class.
		/// </summary>
		public SanPhamEditControlBase()
		{
			InitializeComponent();			
			
			this.uxBindingSource.CurrentItemChanged += new System.EventHandler(uxBindingSource_currentItemChanged);
		}		
		
		/// <summary>
		/// 
		/// </summary>
		private void uxBindingSource_currentItemChanged(object sender, System.EventArgs e)
		{
			if (_SanPham != null) _SanPham.Validate();
		}	
				
		/// <summary>
		/// Initializes the component.
		/// </summary>
		public void InitializeComponent()
		{
			this.components = new System.ComponentModel.Container();
			this.uxErrorProvider = new System.Windows.Forms.ErrorProvider(this.components);
			this.uxBindingSource = new System.Windows.Forms.BindingSource(this.components);
			
			//this.uxTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel();
			this.uxIDSanPham = new System.Windows.Forms.TextBox();
			uxIDSanPhamLabel = new System.Windows.Forms.Label();
			this.uxIDSanPhamDanhMuc = new System.Windows.Forms.ComboBox();
			uxIDSanPhamDanhMucLabel = new System.Windows.Forms.Label();
			this.uxNhaCungCap = new System.Windows.Forms.ComboBox();
			uxNhaCungCapLabel = new System.Windows.Forms.Label();
			this.uxTen = new System.Windows.Forms.TextBox();
			uxTenLabel = new System.Windows.Forms.Label();
			this.uxMoTa = new System.Windows.Forms.TextBox();
			uxMoTaLabel = new System.Windows.Forms.Label();
			this.uxNhaSanXuat = new System.Windows.Forms.TextBox();
			uxNhaSanXuatLabel = new System.Windows.Forms.Label();
			this.uxDonViTinh = new System.Windows.Forms.TextBox();
			uxDonViTinhLabel = new System.Windows.Forms.Label();
			this.uxHinhMinhHoa = new System.Windows.Forms.TextBox();
			uxHinhMinhHoaLabel = new System.Windows.Forms.Label();
			this.uxTrangThai = new System.Windows.Forms.CheckBox();
			uxTrangThaiLabel = new System.Windows.Forms.Label();
			this.uxViTri = new System.Windows.Forms.TextBox();
			uxViTriLabel = new System.Windows.Forms.Label();
			this.uxSoLanXem = new System.Windows.Forms.TextBox();
			uxSoLanXemLabel = new System.Windows.Forms.Label();
			this.uxThoiDiemChinhSua = new System.Windows.Forms.DateTimePicker();
			uxThoiDiemChinhSuaLabel = new System.Windows.Forms.Label();
			this.uxThoiDiemCapNhat = new System.Windows.Forms.DateTimePicker();
			uxThoiDiemCapNhatLabel = new System.Windows.Forms.Label();
			
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).BeginInit();
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).BeginInit();
			this.SuspendLayout();
			
			// 
			// uxTableLayoutPanel
			// 
			//this.uxTableLayoutPanel.AutoSize = true;
			//this.uxTableLayoutPanel.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink;
			//this.uxTableLayoutPanel.ColumnCount = 2;
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 120F));
			//this.uxTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Absolute, 250F));
			//this.uxTableLayoutPanel.Location = new System.Drawing.System.Drawing.Point(3, 3);
			//this.uxTableLayoutPanel.Name = "uxTableLayoutPanel";
			//this.uxTableLayoutPanel.RowCount = 2;
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F));
			//this.uxTableLayoutPanel.Size = new System.Drawing.Size(450, 50);
			//this.uxTableLayoutPanel.TabIndex = 0;
			
			//
			// uxErrorProvider
			//
			this.uxErrorProvider.ContainerControl = this;
			this.uxErrorProvider.DataSource = this.uxBindingSource;
			
			//
			// uxIDSanPhamLabel
			//
			this.uxIDSanPhamLabel.Text = "IDSanPham:";
			this.uxIDSanPhamLabel.Location = new System.Drawing.Point(3, 0);
			this.Controls.Add(this.uxIDSanPhamLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIDSanPhamLabel);			
			//
			// uxIDSanPham
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxIDSanPham);
			this.uxIDSanPham.Location = new System.Drawing.Point(160, 0);
			this.Controls.Add(this.uxIDSanPham);
			//
			// uxIDSanPhamDanhMucLabel
			//
			this.uxIDSanPhamDanhMucLabel.Text = "IDSanPhamDanhMuc:";
			this.uxIDSanPhamDanhMucLabel.Location = new System.Drawing.Point(3, 26);
			this.Controls.Add(this.uxIDSanPhamDanhMucLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxIDSanPhamDanhMucLabel);			
			//
			// uxIDSanPhamDanhMuc
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxIDSanPhamDanhMuc);
			this.uxIDSanPhamDanhMuc.Location = new System.Drawing.Point(160, 26);
			this.Controls.Add(this.uxIDSanPhamDanhMuc);
			//
			// uxNhaCungCapLabel
			//
			this.uxNhaCungCapLabel.Text = "NhaCungCap:";
			this.uxNhaCungCapLabel.Location = new System.Drawing.Point(3, 52);
			this.Controls.Add(this.uxNhaCungCapLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxNhaCungCapLabel);			
			//
			// uxNhaCungCap
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxNhaCungCap);
			this.uxNhaCungCap.Location = new System.Drawing.Point(160, 52);
			this.Controls.Add(this.uxNhaCungCap);
			//
			// uxTenLabel
			//
			this.uxTenLabel.Text = "Ten:";
			this.uxTenLabel.Location = new System.Drawing.Point(3, 78);
			this.Controls.Add(this.uxTenLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxTenLabel);			
			//
			// uxTen
			//
			this.uxTen.Width = 250;
			this.uxTen.MaxLength = 300;
			//this.uxTableLayoutPanel.Controls.Add(this.uxTen);
			this.uxTen.Location = new System.Drawing.Point(160, 78);
			this.Controls.Add(this.uxTen);
			//
			// uxMoTaLabel
			//
			this.uxMoTaLabel.Text = "MoTa:";
			this.uxMoTaLabel.Location = new System.Drawing.Point(3, 104);
			this.Controls.Add(this.uxMoTaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxMoTaLabel);			
			//
			// uxMoTa
			//
			this.uxMoTa.Width = 250;
			this.uxMoTa.MaxLength = 16;
			//this.uxTableLayoutPanel.Controls.Add(this.uxMoTa);
			this.uxMoTa.Location = new System.Drawing.Point(160, 104);
			this.Controls.Add(this.uxMoTa);
			//
			// uxNhaSanXuatLabel
			//
			this.uxNhaSanXuatLabel.Text = "NhaSanXuat:";
			this.uxNhaSanXuatLabel.Location = new System.Drawing.Point(3, 130);
			this.Controls.Add(this.uxNhaSanXuatLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxNhaSanXuatLabel);			
			//
			// uxNhaSanXuat
			//
			this.uxNhaSanXuat.Width = 250;
			this.uxNhaSanXuat.MaxLength = 1024;
			//this.uxTableLayoutPanel.Controls.Add(this.uxNhaSanXuat);
			this.uxNhaSanXuat.Location = new System.Drawing.Point(160, 130);
			this.Controls.Add(this.uxNhaSanXuat);
			//
			// uxDonViTinhLabel
			//
			this.uxDonViTinhLabel.Text = "DonViTinh:";
			this.uxDonViTinhLabel.Location = new System.Drawing.Point(3, 156);
			this.Controls.Add(this.uxDonViTinhLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxDonViTinhLabel);			
			//
			// uxDonViTinh
			//
			this.uxDonViTinh.Width = 250;
			this.uxDonViTinh.MaxLength = 50;
			//this.uxTableLayoutPanel.Controls.Add(this.uxDonViTinh);
			this.uxDonViTinh.Location = new System.Drawing.Point(160, 156);
			this.Controls.Add(this.uxDonViTinh);
			//
			// uxHinhMinhHoaLabel
			//
			this.uxHinhMinhHoaLabel.Text = "HinhMinhHoa:";
			this.uxHinhMinhHoaLabel.Location = new System.Drawing.Point(3, 182);
			this.Controls.Add(this.uxHinhMinhHoaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxHinhMinhHoaLabel);			
			//
			// uxHinhMinhHoa
			//
			this.uxHinhMinhHoa.Width = 250;
			this.uxHinhMinhHoa.MaxLength = 200;
			//this.uxTableLayoutPanel.Controls.Add(this.uxHinhMinhHoa);
			this.uxHinhMinhHoa.Location = new System.Drawing.Point(160, 182);
			this.Controls.Add(this.uxHinhMinhHoa);
			//
			// uxTrangThaiLabel
			//
			this.uxTrangThaiLabel.Text = "TrangThai:";
			this.uxTrangThaiLabel.Location = new System.Drawing.Point(3, 208);
			this.Controls.Add(this.uxTrangThaiLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxTrangThaiLabel);			
			//
			// uxTrangThai
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxTrangThai);
			this.uxTrangThai.Location = new System.Drawing.Point(160, 208);
			this.Controls.Add(this.uxTrangThai);
			//
			// uxViTriLabel
			//
			this.uxViTriLabel.Text = "ViTri:";
			this.uxViTriLabel.Location = new System.Drawing.Point(3, 234);
			this.Controls.Add(this.uxViTriLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxViTriLabel);			
			//
			// uxViTri
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxViTri);
			this.uxViTri.Location = new System.Drawing.Point(160, 234);
			this.Controls.Add(this.uxViTri);
			//
			// uxSoLanXemLabel
			//
			this.uxSoLanXemLabel.Text = "SoLanXem:";
			this.uxSoLanXemLabel.Location = new System.Drawing.Point(3, 260);
			this.Controls.Add(this.uxSoLanXemLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxSoLanXemLabel);			
			//
			// uxSoLanXem
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxSoLanXem);
			this.uxSoLanXem.Location = new System.Drawing.Point(160, 260);
			this.Controls.Add(this.uxSoLanXem);
			//
			// uxThoiDiemChinhSuaLabel
			//
			this.uxThoiDiemChinhSuaLabel.Text = "ThoiDiemChinhSua:";
			this.uxThoiDiemChinhSuaLabel.Location = new System.Drawing.Point(3, 286);
			this.Controls.Add(this.uxThoiDiemChinhSuaLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxThoiDiemChinhSuaLabel);			
			//
			// uxThoiDiemChinhSua
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxThoiDiemChinhSua);
			this.uxThoiDiemChinhSua.Location = new System.Drawing.Point(160, 286);
			this.Controls.Add(this.uxThoiDiemChinhSua);
			//
			// uxThoiDiemCapNhatLabel
			//
			this.uxThoiDiemCapNhatLabel.Text = "ThoiDiemCapNhat:";
			this.uxThoiDiemCapNhatLabel.Location = new System.Drawing.Point(3, 312);
			this.Controls.Add(this.uxThoiDiemCapNhatLabel);
			//this.uxTableLayoutPanel.Controls.Add(this.uxThoiDiemCapNhatLabel);			
			//
			// uxThoiDiemCapNhat
			//
			//this.uxTableLayoutPanel.Controls.Add(this.uxThoiDiemCapNhat);
			this.uxThoiDiemCapNhat.Location = new System.Drawing.Point(160, 312);
			this.Controls.Add(this.uxThoiDiemCapNhat);
			//
			// uxIDSanPhamDanhMuc
			//				
			this.uxIDSanPhamDanhMuc.DisplayMember = "IDSanPhamDanhMucCha";	
			this.uxIDSanPhamDanhMuc.ValueMember = "IDSanPhamDanhMuc";	
			//
			// uxNhaCungCap
			//				
			this.uxNhaCungCap.DisplayMember = "NhaCungCap";	
			this.uxNhaCungCap.ValueMember = "IDNhaCungCap";	
			// 
			// SanPhamEditControlBase
			// 
			this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
			this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
			//this.Controls.Add(this.uxTableLayoutPanel);
			this.AutoScroll = true;
			this.Name = "SanPhamEditControlBase";
			this.Size = new System.Drawing.Size(478, 311);
			//this.Localizable = true;
			((System.ComponentModel.ISupportInitialize)(this.uxErrorProvider)).EndInit();
			((System.ComponentModel.ISupportInitialize)(this.uxBindingSource)).EndInit();			
			this.ResumeLayout(false);
			this.PerformLayout();
		}
		#endregion
				
		#region ComboBox List
		
				
		private Entities.TList<Entities.SanPhamDanhMuc> _IDSanPhamDanhMucList;
		
		/// <summary>
		/// The ComboBox associated with the IDSanPhamDanhMuc property.
		/// </summary>
		[System.ComponentModel.Category("ComboBox BindingSources")]
		public Entities.TList<Entities.SanPhamDanhMuc> IDSanPhamDanhMucList
		{
			get {return _IDSanPhamDanhMucList;}
			set 
			{
				this._IDSanPhamDanhMucList = value;
				this.uxIDSanPhamDanhMuc.DataSource = null;
				this.uxIDSanPhamDanhMuc.DataSource = value;
			}
		}
		
		private bool _allowNewItemInIDSanPhamDanhMucList;
		
		/// <summary>
		/// Indicates if the ComboBox associated with the IDSanPhamDanhMuc property allow user to add item.
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInIDSanPhamDanhMucList
		{
			get { return _allowNewItemInIDSanPhamDanhMucList;}
			set
			{
				this._allowNewItemInIDSanPhamDanhMucList = value;
				this.uxIDSanPhamDanhMuc.DropDownStyle = value ? System.Windows.Forms.ComboBoxStyle.DropDown : System.Windows.Forms.ComboBoxStyle.DropDownList;
			}
		}
		
				
		private Entities.TList<Entities.NhaCungCap> _NhaCungCapList;
		
		/// <summary>
		/// The ComboBox associated with the NhaCungCap property.
		/// </summary>
		[System.ComponentModel.Category("ComboBox BindingSources")]
		public Entities.TList<Entities.NhaCungCap> NhaCungCapList
		{
			get {return _NhaCungCapList;}
			set 
			{
				this._NhaCungCapList = value;
				this.uxNhaCungCap.DataSource = null;
				this.uxNhaCungCap.DataSource = value;
			}
		}
		
		private bool _allowNewItemInNhaCungCapList;
		
		/// <summary>
		/// Indicates if the ComboBox associated with the NhaCungCap property allow user to add item.
		/// </summary>
		[System.ComponentModel.Category(".netTiers"), System.ComponentModel.Description("Indicates if end user can add a new item in the combobox. an event will be thrown then.")]
		public bool AllowNewItemInNhaCungCapList
		{
			get { return _allowNewItemInNhaCungCapList;}
			set
			{
				this._allowNewItemInNhaCungCapList = value;
				this.uxNhaCungCap.DropDownStyle = value ? System.Windows.Forms.ComboBoxStyle.DropDown : System.Windows.Forms.ComboBoxStyle.DropDownList;
			}
		}
		
		
		#endregion
		
		/// <summary> 
		/// Required designer variable.
		/// </summary>
		private System.ComponentModel.IContainer components = null;

		/// <summary> 
		/// Clean up any resources being used.
		/// </summary>
		/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
		protected override void Dispose(bool disposing)
		{
			if (disposing && (components != null))
			{
				components.Dispose();
			}
			base.Dispose(disposing);
		}
	}
}
